import java.util.Scanner;
public class Test {
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextInt()) {// 注意，如果输入是多个测试用例，请通过while循环处理多个测试用例
            int a = in.nextInt();
            int b = in.nextInt();
            System.out.println(a + b);
        }
        in.close();
    }

    public static void main3(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str1 = scan.nextLine();
        Scanner scan1 = new Scanner(System.in);
        String str2 = scan.nextLine();
        for (int i = 0;i< str2.length();i++){
            int index =0;
            while ((index =str1.indexOf(str2.charAt(i)))!=-1){
                str1=str1.substring(0,index)+str1.substring(index+1);

            }
        }
        System.out.println(str1);
    }

    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        String tmp = scan.nextLine();
        String[] str = tmp.split(" ");
        for(int i = str.length-1;i>=0;i--){
                System.out.print(str[i]+" ");
        }
    }
}




